cmake_minimum_required(VERSION 3.13.0)
project(signed_distance_field_2d_test CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED true)



find_package(Eigen3 REQUIRED)
find_package(Python3 COMPONENTS Development NumPy)
find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
include_directories(SYSTEM 
  ${EIGEN3_INCLUDE_DIR}
)
include_directories(
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_BINARY_DIR}
)
add_subdirectory(sdf)

find_package(Python COMPONENTS Development NumPy)
add_executable(signed_distance_field_2d_test 
				tcode/signed_distance_field_2d_test.cc)
target_link_libraries(signed_distance_field_2d_test
				sdf)
target_include_directories(signed_distance_field_2d_test PRIVATE ${Python_INCLUDE_DIRS} ${Python_NumPy_INCLUDE_DIRS})
target_link_libraries(signed_distance_field_2d_test Python::Python Python::NumPy)
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${PYTHON_INCLUDE_DIRS})
